#include <map>
#include <stdio.h>
#include <iostream>
#include <unistd.h>

using namespace std;
typedef struct {
    uint32_t connect;
    uint32_t read;
    uint32_t write;
    uint32_t status;
    uint32_t timeout;
    uint32_t biz;
} stats_errors_t;

typedef struct stats_data {
    uint64_t requests;
    uint64_t connections;
    uint64_t latency; // us
    long double qps;
    stats_errors_t err;
}stats_data_t;

typedef struct wrk_record_t {
    uint64_t     complete;
    uint64_t     requests;
    uint64_t     wbytes;
    uint64_t     rbytes;
    uint64_t     rt;
    uint64_t     connections;
    stats_errors_t errors;
}wrk_record_t;

typedef struct {
    uint64_t count;
    uint64_t limit;
    uint64_t min;
    uint64_t max;
    uint64_t data[];
} stats_t;

typedef struct statistics_t{
    stats_t *latency;
    stats_t *requests;
} statistics_t;

//定时器更新
// (timestamp, stats_data*)
typedef map<uint64_t, stats_data *> series;
typedef map<string, stats_data *> Ynode;
typedef map<uint64_t, Ynode> node;


int main()
{
    std::map<int, std::string> m;

    for(std::map<int, std::string>::iterator it=m.begin(); it!=m.end(); it++) {
        std::cout<<"key = "<<it->first <<", value = "<<it->second << std::endl;
    }

    map<string, series>  map_detail_data;
    std::cout << "empty = "<<map_detail_data.empty() <<std::endl;
    std::cout << "empty = "<<map_detail_data.size() <<std::endl;
    std::cout << "finish" <<std::endl;
    return 0;
}